Read GISTeq's mangled NMEA.
authorrobertl <robertl>
Wed, 6 Jun 2007 20:04:18 +0000 (20:04 +0000)
committerrobertl <robertl>
Wed, 6 Jun 2007 20:04:18 +0000 (20:04 +0000)
nmea.c

diff --git a/nmea.c b/nmea.c
index 841f2483df71b7a0398e46f4ce40ff5da8a2e2f2..0e537a2808ff4dab8c459cdd67030fb14f4a69d5 100644 (file)
--- a/nmea.c
+++ b/nmea.c
@@ -829,6 +829,12 @@ nmea_parse_one_line(char *ibuf)
        int ckval, ckcmp;
        char *tbuf = lrtrim(ibuf);
 
+       /*
+        * GISTEQ PhotoTracker (stupidly) puts a bogus field in front
+        * of the line.  Look for it and toss it.
+        */
+       if (0 == strncmp(tbuf, "---,", 4)) tbuf += 4;
+
        if (*tbuf != '$') return;
        
        ck = strrchr(tbuf, '*');